<div class="form-group">
    <label class="col-sm-2 control-label must">后台登录用户名</label>
    <div class="col-sm-8">
        {ife 'cashier.user' $item}
        <input type="text" class="form-control" name="username" value="{$item['username']}" required/>
        {else}
        <div class="form-control-static must">{$item['username']}</div>
        {/if}
    </div>
</div>
<div class="form-group">
    <label class="col-sm-2 control-label">后台登录密码</label>
    <div class="col-sm-8">
        {ife 'cashier.user' $item}
        <input type="password" class="form-control" name="password" placeholder="默认空,则不修改原密码!"/>
        {else}
        <div class="form-control-static">******</div>
        {/if}
    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label must">绑定管理员微信号</label>
    <div class="col-sm-8">
        {ife 'cashier.user' $item}
        {php echo tpl_selector('manageopenid',array('key'=>'openid','text'=>'nickname', 'thumb'=>'avatar','multi'=>0,'placeholder'=>'昵称/姓名/手机号','buttontext'=>'选择管理员', 'items'=>$manageopenid,'url'=>webUrl('member/query') ))}
        {else}
        <div class="form-control-static">{$item['manageopenid']}</div>
        {/if}
    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label">
        使用期限
    </label>
    {ife 'goods' $item}
    <div class="col-sm-4 col-xs-6">
        {php echo tpl_form_field_daterange('lifetime', array('starttime'=>date('Y-m-d H:i', !empty($item['lifetimestart'])?$item['lifetimestart']:time()),'endtime'=>date('Y-m-d H:i', !empty($item['lifetimeend'])?$item['lifetimeend']:time()+365*24*3600)),true);}
    </div>
    {else}
    <div class="col-sm-6 col-xs-6">
        <div class='form-control-static'>
            {php echo date('Y-m-d H:i',$item['lifetimestart'])} - {php echo date('Y-m-d H:i',$item['lifetimeend'])}
        </div>
    </div>
    {/if}
</div>

<div class="form-group">
    <label class="col-sm-2 control-label">状态</label>
    <div class="col-sm-9 col-xs-12">
        {ife 'cashier.user' $item}
        <label class='radio-inline'>
            <input type='radio' name='status' value='1' {if $item['status']==1}checked{/if} /> 开启
        </label>
        <label class='radio-inline'>
            <input type='radio' name='status' value='0' {if empty($item['status'])}checked{/if} /> 关闭
        </label>
        {else}
        <div class='form-control-static'>{if $item['status']==1}开启{else}关闭{/if}</div>
        {/if}
    </div>
</div>